import request from '@/util/request'

// 获取接口数据
const api = '/api/auth'

//  获取单条数据
export function getEntity (data) {
  return request({
    url: api + '/get',
    method: 'get',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    params: data
  })
}

//  获取数据
export function list (data) {
  return request({
    url: api + '/list',
    method: 'get',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    params: data
  })
}

// 删除
export function remove (data) {
  return request({
    url: api + '/delete',
    method: 'get',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    params: data
  })
}

// 保存
export function save (data) {
  return request({
    url: api + '/save',
    method: 'post',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    params: data
  })
}
